package com.spt.springbootzhsx.service.suggest.Get_Sum_StepFive_6;

import org.apache.hadoop.io.DoubleWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

/*
 **@Author:邓少勋
 **Created on 2022-06-10
 */
public class FiveSum_Mapper extends Mapper<LongWritable, Text, Text, DoubleWritable> {
    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        String[] val=value.toString().split("\t");
        context.write(new Text(val[0]), new DoubleWritable(Double.parseDouble(val[1])));
    }
}
